package com.wh.org.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wh.org.dto.ShopAuditLogDto;
import com.wh.org.pojo.ShopAuditLog;
import com.wh.org.service.IShopAuditLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("shopAuditLog")
public class ShopAuditLogController {

    @Autowired
    public IShopAuditLogService iShopAuditLogService;

    /**
     * c查询所有
     */
    @GetMapping
    public List<ShopAuditLog> findAll(){
        return iShopAuditLogService.findAll();
    }

    @GetMapping("/{id}")
    public ShopAuditLog findOne(@PathVariable("id") Long id){
        return iShopAuditLogService.findOne(id);
    }

    @PostMapping
    public IPage<ShopAuditLog> fingByPage(@RequestBody ShopAuditLogDto shopAuditLogDto){
        return iShopAuditLogService.findByPage(shopAuditLogDto);
    }

}
